Aaron Sliski's Blog

Teaching a Robot to Speak Ladder

Posted on: December 1st, 2026

90's Tech

Ok so if you remember way back in Turbine Time, I told you the whole cabinet that connects the turbine to the grid is run by a PLC and ladder logic, and that we have no documentation, no manual, no schematic, just flying blind. Well that hasnt changed, and it turns out I am a mechanic, not a programmer. Give me a seized bolt, a breaker bar and some persuasion named Kyle and I'm a happy man. Give me a blank ladder screen in Productivity Suite and I start sweating like a sinner in church. So I did what any reasonable person would do in 2026, I spent a whole day building an AI to do it for me. Did it go smoothly? Hell fricken no, but it works.

90's Tech

The idea was simple, keyword "simple". There are a handful of AI PLC tools out there, but basically nothing for AutomationDirect and their Productivity Suite. I wanted to type something like "start button turns on the conveyor, stop button turns it off, and flash a light if it jams" and have ladder logic come out the other end that I can open up and use. And I wanted it to run on my own computer with my own AI, not paying some company every time I ask it a question. My partner in crime for this whole thing was Claude, the AI from Anthropic. I told it what I wanted, it wrote the code, tested it, and fixed it every time I came back and said "yea.... it says invalid again".

90's Tech

Step one was figuring out what the heck a Productivity Suite project file even is. I went digging online and found one old toolkit somebody made years ago for an older version, and that was about it. So we did it the hard way. Turns out the .adpro file is basically a zip file full of text files, one for the tags, one for each ladder task, and so on. Easy right? Yea no.... The newer version adds a little header on the front, and a checksum file that has to match every other file to the byte or Productivity Suite just throws its hands up and says "missing or invalid". We fixed the checksum, still invalid. We fixed the grid width, turns out newer versions use 22 columns not 20, still invalid. You must be thinking to yourself, Aaron what was it then? Windows. It was Windows. Python on Windows was quietly flipping one backslash inside the zip into a forward slash, so Productivity Suite couldnt find its own ladder file. One line of code later it opened, and I may or may not have yelled at my desk. Here it is, a project the AI wrote, opened up in Productivity Suite like it was born there.

90's Tech

Now the tool itself is a little web page that runs on my computer. You load your project, type what you want in plain english, and it shows you the rungs before anything gets written. It talks to my own AI running at home through a thing called Ollama, the model is Qwen 3.5 9B on my RTX 3070, or it can talk to Claude if I give it an API key for the harder stuff. The AI doesnt get to write the file directly, it writes a plan, and then a checker goes through it like a building inspector. Does that tag exist? Does that timer have a time? Is that even possible? If the AI screws up, the checker hands back the list of what's wrong and makes it try again. Here is what a classic start/stop latch looks like in the preview, for the PLC nerds:

Rung 1: Conveyor seal-in
│────[ Start_PB ]──┬──[/ Stop_PB ]──[/Jam_Alarm]──────( Conveyor_Motor )─│
│────[Conveyor_M…]─┘                                                     │

Here's where it got kinda creepy but also really cool. The newer Productivity Suite needs a real example of every single instruction, timers, counters, compares, all of it, so the app can copy the exact format. Well Aaron, are you gonna sit there and drag all of those in by hand? Nope. Claude has this thing called computer use where it takes over your mouse and keyboard and looks at your screen. Above is a time-lapse made from the screenshots it took while it worked. I sat back with my hands off the desk and watched my mouse move all by itself, opening Productivity Suite, dragging in timers, typing in tag names and saving the project. Its a bit like watching a ghost do your homework. Pro tip, I dropped my monitor down to 1600x900 so the screenshots were smaller and it went faster.

Now for the butt puckering part. A 9 billion parameter AI on an 8GB graphics card is not exactly a rocket scientist. My first real test was a tank fill and bottling station, and it fell flat on its face. The answers got cut off halfway through, it picked the wrong kind of timer, and one time it took over 500 seconds and just gave up. So we made it behave. First, Ollama can be given a strict shape the answer has to fit, so the AI cant spit out broken garbage anymore. Second, if I number my request 1, 2, 3, the app hands the AI one step at a time and glues them together after, turns out little AIs are like little kids, one instruction at a time. Third, I ran a command called ollama ps and it said 16% CPU. That means the AI didnt fit on the graphics card and part of it was running on the processor, which is like towing a trailer with the parking brake on. Dropped the memory setting down, back to 100% GPU, and it went from minutes to seconds. Bingo bongo.

You might be asking, Aaron how do you know the AI didnt just make something that will blow up a pump? Great question. The app has a live ladder simulator right next to the rungs. You click the buttons, you watch the power flow turn green, timers count up, counters tick, lights flash. In the video above I hit start and the conveyor latches on, then I bang the part sensor ten times and Batch_Done lights up, then I turn on the jam sensor and after 3 seconds the alarm latches, the conveyor drops out and the warning light starts flashing. Reset, start again, bob's your auntie. If it doesnt work right in the simulator it doesnt go anywhere near a machine, period. AI is a helper, not a replacement for checking your work, and it is never going anywhere near the E-stops. Those stay hard wired like god intended.

90's Tech

Real life is mostly fixing what's already there, not starting from scratch, so now it can edit the ladder too. I can say "change the conveyor delay to 10 seconds" or "delete rung 3" and it shows me a before and after picture of every rung it wants to touch, and leaves everything else exactly how it was, down to the byte. We threw 300 random rungs at it to make sure it reads back exactly what it wrote, 300 out of 300. Then Claude opened the edited project in my Productivity Suite on its own to double check, and it loaded clean. It can even start a brand new project from nothing now, so I dont even need a file to begin with. Devil is in the details.

90's Tech

A bonus which was fun, my C-more touch screen. The tags on the screen never seem to match the PLC, and I never knew why. Turns out the C-more doesnt look at the PLC program at all, it imports a list of tags from a file that Productivity Suite quietly saves next to your project every time you hit save. If you forget to re-import that file after you change something, the two drift apart and you get garbage. So now the app has a button that makes that exact file, and we checked it against three files Productivity Suite made itself, matched byte for byte. Next up is building the C-more screens from a prompt too, but thats an episode for another day.

90's Tech

So does it actually work? Yea, honestly. I can type "make a conveyor with a start stop latch, a 3 second jam alarm, a 10 part counter and a flashing warning light," click a button, poke at it in the simulator, and open a clean project in Productivity Suite. Is it perfect? No... the little AI still puts a rung in the wrong spot sometimes, which is exactly why the before and after view exists. But its ours and so far so good. For a guy who has been flying blind with that PLC cabinet at the dam, going from "I cant do this" to "I built a thing that does this" in one day is pretty wild. And if you dont have a little bit of crazy in a project, is it even fun?

Try it yourself

Want to mess around with it? Here is the latest version of the PLC AI Helper (v0.10). It runs on Windows with Python, and talks to your own Ollama AI or to Claude with an API key. Unzip it, double click start_windows.bat, and the README walks you through the rest.

Download PLC AI Helper v0.10 (.rar)

Use at your own risk. Always open what it makes in Productivity Suite, check every rung, test it in the simulator, and never send AI logic straight to a running machine. And it doesnt replace hard wired safety like E-stops, ever.

← Next Post Previous Post →